﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Front/Site.Master" AutoEventWireup="true" CodeBehind="ShopRegister.aspx.cs" Inherits="VK.Casemeet.Web.Front.ShopRegister" %>

<%@ Register src="/Admin/Controls/ImgControl.ascx" tagname="ImgControl" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="contentHead" runat="server">
    <script type="text/javascript" src="/Scripts/ajaxupload.js"></script>
    <link href="/Front/css/log_reg.css" type="text/css" rel="stylesheet" charset="utf-8" />
    <script type="text/javascript">
        $("document").ready(function () {
            BindArea(0, "#ddlArea1");
        });

        function BindArea(parentID, ddlControl, area1, area2, area3) {
            $.ajax({
                type: "post",
                url: "/Admin/CommService.asmx/GetArea",
                dataType: "json",
                contentType: "application/json;charset=utf-8",
                data: "{ \"parentID\":" + parentID + " }",
                beforeSend: function (jsonHttpRequest) {
                    this;
                },
                success: function (jsonHttpRequest, textStatus) {
                    var temp_option = new String;
                    temp_option += "<option value=\"0\">请选择</option>";
                    if (ddlControl == "#ddlArea1") { temp_option = fillOption(temp_option, jsonHttpRequest, area1); }
                    if (ddlControl == "#ddlArea2" && parentID != "0") { temp_option = fillOption(temp_option, jsonHttpRequest, area2); }
                    if (ddlControl == "#ddlArea3" && parentID != "0") { temp_option = fillOption(temp_option, jsonHttpRequest, area3); }
                    $(ddlControl).html(temp_option);
                    if (ddlControl == "#ddlArea1") {
                        BindArea($(ddlControl).val(), "#ddlArea2", area1, area2, area3);
                    }
                    if (ddlControl == "#ddlArea2") {
                        BindArea($(ddlControl).val(), "#ddlArea3", area1, area2, area3);
                    }
                },
                error: function (jsonHttpRequest, textStatus, errorThrown) {
                    this;
                },
                complete: function (jsonHttpRequest, textStatus) {
                    this;
                }
            });
        }
        function area1_onchange() {
            if ($("#ddlArea1").val() != "0") {
                $("#ddlArea2").html("");
                BindArea($("#ddlArea1").val(), "#ddlArea2", 0, 0, 0);
            }
        }
        function area2_onchange() {
            if ($("#ddlArea2").val() != "0") {
                $("#ddlArea3").html("");
                BindArea($("#ddlArea2").val(), "#ddlArea3", 0, 0, 0);
            }
        }
        function area3_onchange() {
            if ($("#ddlArea3").val() != "0") {
            }
        }
        function fillOption(temp_option, jsonHttpRequest, area) {
            $.each(jsonHttpRequest.d, function (i, field) {
                if (area == field.Name) {
                    temp_option += "<option selected value=\"" + field.AreaID + "\">" + field.Name + "</option>";
                } else {
                    temp_option += "<option value=\"" + field.AreaID + "\">" + field.Name + "</option>";
                }
            });
            return temp_option;
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="contentBody" runat="server">
    <div id="content_width">
		<!----内容-----> 
		<div id="content">
			<div class="data_box_content bg border">
				<div class="title bluetitle"><p>当前位置 >  <a href="/Default_<% =(Master as VK.Casemeet.Web.Front.Site).GetAreaUrl() %>.html">首页</a> > 企业注册</p></div>
				<div class="GroupRegister">
				<table id="data_form" cellpadding="0" cellspacing="0" style="border-collapse:collapse;">
					<tbody>
					<tr>
						<th  colspan="2"><div class="reg_title"><h3>企业注册  Enterprises Register</h3><span><a href="MemberRegister.html">用户注册</a></span></div></th>
					</tr>
					<tr>
						<th width="20%">帐号：</th>
						<td width="80%"><asp:TextBox ID="txtAccount" runat="server" placeholder="登录帐号" CssClass="text"></asp:TextBox> <span> *</span></td>
					</tr>
					<tr>
						<th>密码：</th>
						<td><asp:TextBox ID="txtPass" runat="server" placeholder="输入密码" CssClass="text" TextMode="Password"></asp:TextBox> <span> *</span></td>
					</tr>
                    <tr>
						<th>确认密码：</th>
						<td><asp:TextBox ID="txtPassCheck" runat="server" placeholder="确认密码" CssClass="text" TextMode="Password"></asp:TextBox> <span> *</span></td>
					</tr>
                    <tr>
						<th>企业全称：</th>
						<td><asp:TextBox ID="txtName" runat="server" placeholder="填写企业全称" CssClass="text"></asp:TextBox><span>*</span><span class="prompt_state"></span></td>
					</tr>
                    <tr>
						<th>企业类型：</th>
						<td><asp:DropDownList ID="ddlType" runat="server"></asp:DropDownList> <span> *</span></td>
					</tr>
                    <tr>
						<th>所在地区：</th>
						<td>
                            <select id="ddlArea1" name="ddlArea1" onchange="area1_onchange();" class="regSlt {min:1, messages:{min:'请选择一项'}}" style="width:auto;"></select>
		                    <select id="ddlArea2" name="ddlArea2" onchange="area2_onchange();" class="regSlt {min:1, messages:{min:'请选择一项'}}" style="width:auto;"></select>
		                    <select id="ddlArea3" name="ddlArea3" onchange="area3_onchange();" class="regSlt {min:1, messages:{min:'请选择一项'}}" style="width:auto;"></select>
                            <span> *</span>
                        </td>
					</tr>
                    <tr>
						<th>联系人：</th>
						<td><asp:TextBox ID="txtContact" runat="server" placeholder="填写联系人姓名" CssClass="text"></asp:TextBox> <span> *</span></td>
					</tr>
                    <tr>
						<th>联系电话：</th>
						<td><asp:TextBox ID="txtTelephone" runat="server" placeholder="填写手机或固话" CssClass="text"></asp:TextBox> <span> *</span></td>
					</tr>
                    <tr>
						<th>联系QQ：</th>
						<td><asp:TextBox ID="txtQQ" runat="server" placeholder="填写联系QQ" CssClass="text"></asp:TextBox> <span> *</span></td>
					</tr>
                    <tr>
						<th>电子邮箱：</th>
						<td><asp:TextBox ID="txtEmail" runat="server" placeholder="填写电子邮箱" CssClass="text"></asp:TextBox> <span> *</span></td>
					</tr>
                    <tr>
						<th>通讯地址：</th>
						<td><asp:TextBox ID="txtAddress" runat="server" placeholder="填写通讯地址" CssClass="text"></asp:TextBox> <span> *</span></td>
					</tr>
                    <tr>
                        <th>企业Logo：</th>
                        <td><uc1:ImgControl ID="ImgLogo" runat="server" defaultImgUrl="Null.jpg" folderName="Logos" imgHeight="85" imgWidth="188" tipHeight="85" tipWidth="188" /></td>
                    </tr>
                    <tr>
						<th>企业介绍：</th>
						<td><asp:TextBox ID="txtCompany" runat="server" placeholder="填写公司介绍，最多不超过100字。" CssClass="text" TextMode="MultiLine"></asp:TextBox> </td>
					</tr>
					<tr>
						<th>验证码：</th>
						<td class="verification_code"><asp:TextBox ID="txtCode" runat="server" placeholder="验证码" CssClass="text"></asp:TextBox><em><img class="hand" src="/PageHandler/ValidateCode.ashx?wSize=1.5&hSize=1.4&fSize=1.3&cookie=AdminValidateCode&count=5" onclick="this.src='/PageHandler/ValidateCode.ashx?wSize=1.5&hSize=1.4&fSize=1.3&cookie=AdminValidateCode&count=5&id='+Math.random();" title="看不清换一张" alt="看不清换一张" /></em></td>
					</tr>
                    <tr>
						<th></th>
						<td class="prompt_state"><% =strMessage %></td>
					</tr>
					<tr>
						<th></th>
						<td><asp:Button ID="butSubmit" runat="server" CssClass="submit" Text="立即注册" onclick="butSubmit_Click" /> <span>已有账号？请<a href="MemberLogin.html">登陆</a></span></td>
					</tr>
				</tbody>
				</table><div class="clear"></div>
			</div>
			</div>
		</div>
	</div>
</asp:Content>
